package com.hushao.lims.weblims.service;

import com.hushao.lims.weblims.domain.EquipmentApply;
import com.hushao.lims.weblims.domain.EquipmentInfo;
import com.hushao.lims.weblims.domain.TeacherInfo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * @author 930588706
 * @date 18/1/25
 * 申请器材
 */
public interface EquipmentApplyService {
    /**
     * 查询有没有申请器材
     * @param equipmentInfo
     * @param equipmentCount
     * @param s
     * @return
     */
    List<EquipmentApply> listEquipmentAndCountAndState(EquipmentInfo equipmentInfo, Integer equipmentCount, String s);

    /**
     * 修改申请器材表
     * @param ea
     * @return
     */
    EquipmentApply update(EquipmentApply ea);

    /**
     * 根据器材，教师，状态
     * @param equipmentInfo
     * @param teacherInfo
     * @param s
     * @return
     */

    List<EquipmentApply> listEquipmentAndGiveBackAndState(EquipmentInfo equipmentInfo, TeacherInfo teacherInfo, String s);
    /**
     * 修改申请器材表
     * @param equipmentApplies
     * @return
     */
    void update(List<EquipmentApply> equipmentApplies);

    /**
     * 根据器材名称，状态，模糊查询申请使用器材列表
     * @param equipmentName
     * @param state
     * @param pageable
     * @return
     */
    Page<EquipmentApply> listEquipmentApplyByNameLikeAndStateLike(String equipmentName, String state, Pageable pageable);

    /**
     * 审核此器材申请
     * @param equipmentApplyId
     * @param state
     * @param teacher
     */
    void audit(Long equipmentApplyId, String state, TeacherInfo teacher)throws Exception;
}
